package day04;
//循环结构for的案例
public class ForDemo {
    public static void main(String[] args) {
        //九九乘法表
for (int i =1; i<=9; i++){
    for (int j =1; j <=i; j++){
        System.out.print(j + "*"+ i+ "=" +(i*j)+"\t");

    }
    System.out.println();
}

     /*   for (int times =0;times<5;times++){
            System.out.println("我今天不爱你");
        }
        System.out.println("明天再爱你");

      */
        /*
        执行过程：
        times=0      true   输出
        times = 1      true   输出
        times = 2      true   输出
        times =3     true    输出
        times =4   true     输出
        times -5    false  for 结束
        输出继续执行
         */
/*
        for (int num =1;num <=9;num++){
            System.out.println(num+"*9="+num*9);
        }
        for (int num=1;num<=9;num+=2){
            System.out.println(num+"*9="+num*9);
        }
        for (int num=9;num>=1;num--){
            System.out.println(num+"*9="+num*9);
        }
 */

//int  sum =0;
//for (int i=1;i<=100;i++){
//    sum +=i;
//}
//        System.out.println("sum"+sum);




    }
}
